import request from "@/utils/request";

/**
 * 保存修改日程信息
 * @param data
 * @returns {AxiosPromise}
 */
export function saveSchedule(data) {
  return request({
    url: "rest/api/webhook/template/schedule/saveSchedule",
    method: "post",
    data,
  });
}

/**
 * 分页查询自己发起的日程
 * @param data
 * @returns {AxiosPromise}
 */
export function queryAllScheduleByPage(params) {
  return request({
    url: "rest/api/webhook/template/schedule/queryPager",
    method: "get",
    params,
  });
}

/**
 * 条件查询个人日程信息
 * @param data
 * @returns {AxiosPromise}
 */
export function queryAllMyScheduleByPage(params) {
  return request({
    url: "rest/api/webhook/template/schedule/queryMySchedulePager",
    method: "get",
    params,
  });
}

/**
 * 删除日程
 * @param params
 * @returns {AxiosPromise}
 */
export function deleteObject(params) {
  return request({
    url: "rest/api/webhook/template/schedule/deleteSchedule",
    method: "get",
    params,
  });
}

/**
 * 查询日程详情详情
 * @param params
 * @returns {AxiosPromise}
 */
export function getEntity(params) {
  return request({
    url: "rest/api/webhook/template/schedule/getScheduleInfo",
    method: "get",
    params,
  });
}
